{
  "properties" : { },
  "id" : "9a8fdc9fc64b41f8a6900ac51be705ff",
  "script" : null,
  "groupId" : "5affd458495e4bf8a43e1f578f0ce3a9",
  "name" : "7日告警情况查询",
  "createTime" : 1727070945586,
  "updateTime" : 1726299975397,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "dayCount",
  "method" : "GET",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": [\n        {\n            \"statisticsDate\": \"2024-09-08\",\n            \"alarmCount\": 0,\n            \"recoveryAlarmCount\": 0,\n            \"confirmAlarmCount\": 0\n        },\n        {\n            \"statisticsDate\": \"2024-09-09\",\n            \"alarmCount\": 0,\n            \"recoveryAlarmCount\": 0,\n            \"confirmAlarmCount\": 0\n        },\n        {\n            \"statisticsDate\": \"2024-09-10\",\n            \"alarmCount\": 0,\n            \"recoveryAlarmCount\": 0,\n            \"confirmAlarmCount\": 0\n        },\n        {\n            \"statisticsDate\": \"2024-09-11\",\n            \"alarmCount\": 0,\n            \"recoveryAlarmCount\": 0,\n            \"confirmAlarmCount\": 0\n        },\n        {\n            \"statisticsDate\": \"2024-09-12\",\n            \"alarmCount\": 11,\n            \"recoveryAlarmCount\": 0,\n            \"confirmAlarmCount\": 0\n        },\n        {\n            \"statisticsDate\": \"2024-09-13\",\n            \"alarmCount\": 0,\n            \"recoveryAlarmCount\": 0,\n            \"confirmAlarmCount\": 0\n        },\n        {\n            \"statisticsDate\": \"2024-09-14\",\n            \"alarmCount\": 0,\n            \"recoveryAlarmCount\": 0,\n            \"confirmAlarmCount\": 0\n        }\n    ]\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }
}
================================
import java.time.LocalDateTime;
import java.text.SimpleDateFormat;


week = new ArrayList();
for (item in range(-6, 0)) {
    DateTime dayTime2 = DateUtil.getDayTime(item);
    SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
    String format = formatter.format(dayTime2);
    startTime = DateUtil.getDayTime(item)
    endTime = DateUtil.getDayTime(item + 1)
    int alarmCount = 0;
    int recoveryAlarmCount = 0;
    //获得末日零时之前全部告警数量
    sql1 = """
            select count(*) number from alarm_info where first_alarm_time between #{startTime} and #{endTime}
        """
    alarmCount = db.selectOne(sql1)
    //获得末日零时之前全部已恢复告警数量
    sql2 = """ 
            select count(*) number from alarm_info where is_recovery = 0 and recovery_time between #{startTime} and #{endTime}
        """
    recoveryAlarmCount = db.selectOne(sql2)
    var countVO = {
        "statisticsDate": format,
        "alarmCount": alarmCount.number::int,
        "recoveryAlarmCount": recoveryAlarmCount.number::int,
        "confirmAlarmCount": 0
    }
    week.add(countVO);
}
return week;